#ifndef __MEM_BLOCK_H_H_
#define __MEM_BLOCK_H_H_

#include "stdint.h"

#ifdef __cplusplus
extern "C"
{
#endif

	typedef struct
	{
		void *mem;		   
		int16_t e_size;	   
		int16_t e_len;	   
		uint8_t empty_val; 
	} mem_block_obj_type;

	void mem_block_mem_clr(const mem_block_obj_type *obj);									
	int mem_block_dat_insert(const mem_block_obj_type *obj, int16_t site, void *dat);		
	int mem_block_site_delete(const mem_block_obj_type *obj, int16_t site);					
	int mem_block_site_clr(const mem_block_obj_type *obj, int16_t site);					
	int mem_block_dat_add(const mem_block_obj_type *obj, void *dat);						
	int mem_block_dat_replace(const mem_block_obj_type *obj, void *dat_old, void *dat_new); 
	int mem_block_dat_site(const mem_block_obj_type *obj, void *dat);						
	int mem_block_dat_site_ext(const mem_block_obj_type *obj, void *dat, int16_t num);		
	int mem_block_dat_site_tail(const mem_block_obj_type *obj, void *dat);					
	int mem_block_dat_amount(const mem_block_obj_type *obj, void *dat);						

	int mem_block_str_len(const mem_block_obj_type *obj);								   
	int mem_block_str_dat_site(const mem_block_obj_type *obj, void *dat);				   
	int mem_block_str_dat_site_ext(const mem_block_obj_type *obj, void *dat, int16_t num); 
	int mem_block_str_dat_site_tail(const mem_block_obj_type *obj, void *dat);			   

#ifdef __cplusplus
}
#endif

#endif 
